package com.changan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 试卷题目关联表
 * </p>
 *
 * @author NieChangan
 * @since 2025-09-03
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("exam_questions")
public class ExamQuestions extends Model<ExamQuestions> {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 试卷ID
     */
    @TableField("exam_id")
    private Integer examId;

    /**
     * 题目ID
     */
    @TableField("question_id")
    private Integer questionId;

    /**
     * 题目排序
     */
    @TableField("sort")
    private Integer sort;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
